import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import Form from '../views/formPages/form.vue'
import DataManage from '../views/formPages/dataManage.vue'
import FormFix from "../views/formPages/FormFix.vue"
const routes = [
    {
        path: '/',
        name: 'Home',
        redirect: (to) => {
            return { name: "Form" };
        },
        component: Home,
        children:[
            {
                path: 'form',
                name: 'Form',
                components: {
                    leftForm:Form,
                    rightForm:DataManage,
                },
                children:[
                    {
                        path: 'form-fix/:current_point',
                        name: 'FormFix',
                        component:FormFix,
                    },
                ]
            },
        ]
    },
]
const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router